home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
mcu332
/
332doc.arc
/
332BUGC&
< prev
next >
Wrap
Text File
|
1989-12-19
|
10KB
|
240 lines
DEBUG MONITOR USER'S MANUAL MOTOROLA
1-1 M68332BUG
DEBUG MONITOR USER'S MANUAL MOTOROLA
M68332BUG 1-1
CHAPTER 1
GENERAL INFORMATION
1.1 INTRODUCTION
This chapter provides a general description, installation instructions, start-up and system
restart instructions, memory requirements, and a terminal input/output (I/O) control description
for the M68332BUG Debug Monitor (hereafter referred to as 332Bug). Information in this
manual covers the 1.01 version of the 332Bug.
1.2 GENERAL DESCRIPTION
The 332Bug package evaluates and debugs systems built around the M68332BCC Business
Card Computer. System evaluation facilities are available for loading and executing user
programs. Various 332Bug routines that handle I/O, data conversion, and string functions are
available to user programs through the TRAP #15 handler.
332Bug includes:
Ñ Commands for display and modification of memory,
Ñ Breakpoint capabilities,
Ñ A assembler/disassembler useful for patching programs,
Ñ A power-up self test feature which verifies system integrity,
Ñ A command-driven user-interactive software debugger (the debugger), and
Ñ A user interface which accepts commands from the system console terminal.
There are two modes of operation in the 332Bug monitor; the debugger mode and the
diagnostic mode. When the user is in the debugger directory the prompt 332Bug> is
displayed, and the user has access to the debugger commands (see Chapter 3). When the
user is in the diagnostic mode the prompt 332Diag> is displayed, and the user has access
to the diagnostic commands (see Chapter 6). These modes are also called directories.
332Bug is command-driven. It performs various operations in response to user commands
entered at the keyboard. Figure 1-1 illustrates the flow of control in 332Bug. 332Bug
executes entered commands and the prompt reappears upon completion. However, if a
command is entered which causes execution of user target code (i.e., GO) then control may
or may not return to 332Bug. This depends upon the user program function.
332Bug is similar to Motorola's other debugging packages, but there are two noticeable
differences. Many of the commands are more flexible with enhanced functionality. And the
debugger has more detailed error messages and an expanded on-line help facility.
Figure 1-1. 332Bug Operation Mode Flow Diagram
1.3 USING THIS MANUAL
Those users unfamiliar with debugging packages should read Chapter 1 before attempting to
use 332Bug. This provides information about 332Bug structure and capabilities.
Paragraph 1.4 INSTALLATION AND START-UP describes a step-by-step procedure for
powering up the module and obtaining the 332Bug prompt on the terminal screen.
For questions about syntax or operation of a particular 332Bug command, turn to the
paragraph which describes that particular command in Chapter 3.
Some debugger commands take advantage of the built-in one-line assembler/disassembler.
The command descriptions in Chapter 3 assume that the user is familiar with the
assembler/disassembler functionality. Chapter 4 includes a description of the assembler/
disassembler.
NOTE
In the examples shown, all user inputs are given in bold text. This should clarify
the examples by distinguishing between character input by the user and
character output by 332Bug. The symbol <CR> represents the carriage return
key on the user's terminal keyboard. Whenever this symbol appears it indicates
a carriage return should be entered by the user.
1.4 INSTALLATION AND START-UP
Use the following set-up procedure to enable 332Bug to operate with the M68332BCC:
a. Configure the jumpers on the BCC module. Refer to the M68332BCC User's
Manual Motorola publication number M68332BCC/AD1
b. Connect the DB-9 serial communication cable connector to the terminal or
host computer which is to be the 332Bug system console. Connect the other
end of the cable to P4 on the BCC.
Set up the terminal as follows:
Ñ Eight bits per character
Ñ One stop bit per character
Ñ Parity disable
Ñ 9600 baud rate
NOTE
In order for high-baud rate serial communication between 332Bug
and the terminal to function properly, the terminal must use
XON/XOFF handshaking. If messages are garbled and have
missing characters, check the terminal to verify XON/XOFF
handshaking is enabled.
c. Power up the system. 332Bug executes a self-test and displays the sign on
message (which includes version number) and the debugger prompt 332Bug>.
1.5 SYSTEM RESTART
There are three ways to initialize the system to a known state. Each situation determines the
appropriate system restart technique.
1.5.1 Reset
The M68332PFB platform board reset pushbutton returns the system to a known state. When
the reset pushbutton is first pushed the MC68332 MCU send the default XON character to the
terminal to prevent possible terminal lockup. There are two reset modes: COLD and WARM.
COLD reset mode is the 332Bug default, refer to the RESET command description. During
COLD reset a total system initialization occurs, similiar to the M68332BCC power-up
sequence. All static variables are restored to their default states. The serial port is reset to its
default state. The breakpoint table is cleared. The offset registers are cleared. The target
registers are invalidated. Input and output character queues are cleared. On-board devices
(timer, serial ports, etc) are reset. During WARM reset, 332Bug variables and tables are
preserved, as well as the target state registers and breakpoints.
Use reset if the processor halts, for example, after a halt monitor fault, or if the 332Bug
environment is lost (vector table is destroyed, etc).
1.5.2 Abort
The M68332PFB platform board ABORT pushbutton terminates all inprocess instructions.
When abort is executed while running target code, a snapshot of the processor state is
captured and stored in the target registers. For this reason Abort is appropriate when
terminating a user program that is being debugged. Use abort to regain control if the
program gets caught in a loop, etc. The target PC, stack pointers, etc. help pinpoint
malfunctions.
Abort generates a non-maskable, level-seven interrupt. The target registers reflect the
machine state at the time of an abort and are displayed on the display screen. Any
breakpoints installed in the user code are removed and the breakpoint table remains intact.
Control is then returned to the debugger.
1.5.3 Break
The BREAK key on the terminal keyboard initiates a break. Break does not generate an
interrupt. The only time break is recognized is when characters are sent or received by the
debugger console. Break removes any breakpoints in the user code and keeps the
breakpoint table intact. Break does not, however, take a snapshot of the machine state nor
does it display the target registers. It is useful for terminating active debugger commands that
are outputing large blocks of data.
NOTE
When using terminal emulation programs such as ProComm or Kermit, the
BREAK key on the keyboard is local to the emulation program and may not be
transmitted to the BCC. Consult your emulation program's user manual for the
procedure on sending a BREAK signal to the port connected to the BCC.
1.6 MEMORY REQUIREMENTS
The program portion of 332Bug is approximately 64k bytes of code. The EPROM on-board
the M68332BCC contains 128k bytes and is mapped at locations $60000 to $7FFFF.
However, the 332Bug code is position-independent and can execute anywhere in memory.
The second half of the EPROM ($70000 - $7FFFF) is blank and available for user programs.
See Appendix C 332Bug Customization.
332Bug requires a minimum of 12k bytes of random access memory (RAM) to operate. This
memory may be either off-board system memory (i.e., on an external memory board) or
M68332BCC on-board RAM. On-board RAM allows stand-alone operation of the
M68332BCC.
The first 12k bytes are used for 332Bug stack and static variable space and the rest of
memory is reserved as user space. Whenever the M68332BCC is reset, the target program
counter is initialized to the beginning user space address and the target stack pointers are
initialized to addresses at the end of the user space. The target instruction stack pointer
(SSP) is set to the top of the user space. Register initialization is done solely as a
convienience for the user. Consult the CPU32 Reference Manual for information regarding
actual register values during a power-on/reset.
Figure 1-2. BCC Memory Map
1.7 TERMINAL INPUT/OUTPUT CONTROL
When entering a command at the prompt, the following control codes may have a caret, " ^ ",
preceding the character, this indicates that the Control or CTRL key must be held down while
striking the character key).
^X (Cancel line) - The cursor is backspaced to the beginning of the line.
If the terminal port is configured with the hardcopy or
TTY option (see PF command) then a carriage return,
line feed, and new prompt are displayed.
^H (backspace) - The cursor is moved back one position. The character
at the new cursor position is erased. If the hardcopy
option is selected a slash (/) character is typed along
with the deleted character.
<del> (delete/rubout) - Performs the same function as ''^H''.
^D (redisplay) - The entire command line as entered is redisplayed on
the following line.
When observing output from any 332Bug command, the XON and XOFF characters may be
entered to control the output, if the XON/XOFF protocol is enabled (default). These
characters are initialized to ''^S'' and ''^Q'' respectively by 332Bug, but may be changed by
the user using the PF command. The initialized (default) mode operations are:
^S (wait) - Console output is halted.
^Q (resume) - Console output is resumed.